package types

const (
	MsgTypeLack = "lack" // 仓库缺货
	MsgTypePick = "pick" // 仓库取货
)

// PubTemplate 模版消息类型
type PubTemplate struct {
	TitleID  string
	Title    string
	KeyIDS   []int64
	Desc     string
	Type     string
	Domain   string
	Category [2]int64 // 类目信息 first, second
}

// GetPubTemplate 获取模版类型
func GetPubTemplate(scene string) PubTemplate {
	return map[string]PubTemplate{
		MsgTypeLack: {
			TitleID:  "2105",
			Title:    "缺货通知",
			KeyIDS:   []int64{4, 2, 1, 6},
			Desc:     "缺货通知",
			Domain:   "inventory",
			Category: [2]int64{150, 670},
		},
		MsgTypePick: {
			TitleID:  "1460",
			Title:    "提货通知",
			KeyIDS:   []int64{9, 11, 2, 15},
			Desc:     "提货通知",
			Domain:   "inventory",
			Category: [2]int64{150, 670},
		},
	}[scene]
}

func AllPubTemplates() []PubTemplate {
	return []PubTemplate{
		{
			TitleID:  "2105",
			Title:    "缺货通知",
			KeyIDS:   []int64{4, 2, 1, 6},
			Desc:     "缺货通知",
			Type:     MsgTypeLack,
			Domain:   "inventory",
			Category: [2]int64{150, 670},
		},
		{
			TitleID:  "1460",
			Title:    "提货通知",
			KeyIDS:   []int64{9, 11, 2, 15},
			Desc:     "提货通知",
			Type:     MsgTypePick,
			Domain:   "inventory",
			Category: [2]int64{150, 670},
		},
	}
}
